package br.indt.framework.scheduler;

/**
 *
 * @author efirmino
 */
class Job {
    private final Task task;
    private boolean periodic;
    private int delay;

    Job(Task t, int delaySeconds, boolean periodic) {
        this.task = t;
        this.delay = delaySeconds;
        this.periodic = periodic;
    }

    public boolean isPeriodic() {
        return periodic;
    }

    public Task getTask() {
        return task;
    }

    public void setPeriodic() {
        periodic = true;
    }

    public void setNoPeriodic() {
        periodic = false;
    }

    public int getDelay() {
        return delay;
    }

    public void setDelay(int delaySeconds) {
        this.delay = delaySeconds;
    }

}
